Ext.define('A4.view.desktop.usermanager.EditUserView',{
	extend:'Ext.window.Window',
	id:'edit-user-win',
	//显示此窗口时遮罩其他组件
	modal:true,
	autoShow:true,
	title:'编辑用户',
	width:800,
	height:400,
	layout:'fit',
	minimizable:true,
	maximizable:true,
	
	items:[{
		layout:'hbox',
		bodyBorder:false,
		frame:true,
		items:[
		    // fieldset start
			{
				xtype:'fieldset',
				title:'用户信息',
				width:330,
				height:310,
				style:'margin:10px',
				frame:true,
				
				// form start
				items:[{
				    xtype:'form',
				    id:'create-user-form',
				    style:'margin:5px',
				    frame:true,
				    border:0,
				    defaults: {
			           	labelSeparator :'：',
			           	labelWidth : 60,
			           	width:230
			           	},
		      	    defaultType: 'textfield',
		      	    items: [
		                       {
		                       	 fieldLabel: '用户名',
		                            name: 'userName',
		                            style:'font-size:15px',
		                            allowBlank:false
		                            
		                       },
		                       {
		                       	   fieldLabel: '密码',
		                              name: 'password',
		                              style: 'font-size: 15px',
		                              inputType: 'password',
		                              allowBlank:false
		                       },
		                       {
		                       	  fieldLabel: '确认密码',
		                             name: 'password',
		                             style: 'font-size: 15px',
		                             inputType: 'password',
		                             allowBlank:false
		                       },
		                       {
		                       	xtype : 'radiogroup',
		                           fieldLabel:'使用状态',
		                           columns:2,
		                           items:[{
		                           	name:'status',
		                           	inputValue:'1',
		                           	boxLabel:'启用',
		                           	checked:true
		                           },{
		                           	name:'status',
		                           	inputValue:'2',
		                           	boxLabel:'禁用'
		                           }]
		                       },
		                       {
		                       	xtype:'textarea',
		                           name:'mark',
		                           fieldLabel: '备注',
		                           width:260
		                       }
		                   ]
				}]
				// form end
			  
			},
			// fieldset end
	
			// fieldset start
			{
				 xtype:'fieldset',
				 width:400,
		    	 title:'所属角色',
		    	 height:310,
		    	 style:'margin:10px',
		    	 frame:true,
		    	 // grid start
		    	 items:[{
		    	    xtype: 'grid',
		    	    id:'create-user-role-grid',
		    	    style:'margin:5px',
		    	    dockedItems:[{    
                      	 dock:'bottom',    
                      	 xtype:'pagingtoolbar',
                      	 store:Ext.create('A4.store.rolemanager.RoleListStore'),
                      	 displayInfo:true,    
                      	 displayMsg:'显示{0}-{1}条，共计{2}条',    
                      	 emptyMsg:'没有数据'    
                       }],
                    
                       selModel: new Ext.selection.CheckboxModel,
                        columns: [
		                   {
		                       text: "角色名",
		                       flex:1,
		                       sortable: true,
		                       dataIndex: 'roleName'
		                   },
		                   {
		                       text: "描述",
		                       width: 150,
		                       sortable: true,
		                       dataIndex: 'mark'
		                   }],
		                   store:Ext.create('A4.store.rolemanager.RoleListStore')
		    	 }]
		    	 // grid end
			
			}
			//fieldset end
		
		]
	}],
	
	buttons:[{
			text:'完成',
			iconCls:'create-user-finsh',
			id:'create-user-finsh'
		
		},'-',{
			text:'取消',
			iconCls:'remove',
			id:'cancel'
		    
		}]
		
	
	
});